package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.TravelLike;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TravelLikeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TravelLike record);

    TravelLike selectByPrimaryKey(Long id);

    List<TravelLike> selectAll();

    int updateByPrimaryKey(TravelLike record);

    TravelLike queryExistLikeByUserIdAndTravelId(@Param("userId") Long userId, @Param("travelId") Long travelId);

    void insertTravelNum(@Param("userId") Long userId, @Param("travelId") Long travelId, @Param("l") long l);

    Long queryNumByTravelId(Long travelId);

    void delete(Long userId);

    void deleteTravelNum(@Param("userId") Long userId, @Param("travelId") Long travelId);

    Long queryForNumByTravelId(Long travelId);


}